package com.ding.email.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver;

/**
 * @author dingfeng
 * @version 1.0
 * @DEC
 * @date 2022-03-29 17:40
 */
@Configuration
public class FreeMarkerViewResolverConfig {

    @Bean
    public FreeMarkerViewResolver freeMarkerViewResolver() {
        FreeMarkerViewResolver resolver = new FreeMarkerViewResolver();
        resolver.setCache(true);
        resolver.setSuffix(".html");
        resolver.setOrder(0);
        resolver.setContentType("text/html;charset=UTF-8");
        return resolver;
    }

}
